#!/usr/bin/python
# -*- coding: utf-8 -*-

def convert(color):
	if len(color) == 4:
		if isinstance(color[0], float):
			return color
		else:
			return [comp/255.0 for comp in color]
	elif len(color) == 3:
		if isinstance(color[0], float):
			c = color
		else:
			c = [comp/255.0 for comp in color]
		
		c.append(1.0)
		return c
	else:
		raise ValueError('color arument not valid')

def check(color):
	if len(color) == 4:
		return color
	elif len(color) == 3:
		return (color[0], color[1], color[2], 255)
	else:
		raise ValueError('color arument not valid')